<div class="layui-card-body">
   <input type="hidden" name="id"  value="{{ $article->id??'' }}"> 
   <div class="layui-tab layui-tab-brief" lay-filter="tablist">
      <ul class="layui-tab-title">
        <li class="layui-this" lay-id="base" >基本信息</li>
        <li lay-id="contentbody">文章内容</li>
      </ul>
      <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">

            <div class="layui-form-item">
                <label class="layui-form-label layui-required">栏目分类</label>
                <div class="layui-input-block" style="width:500px">
                    <select name="column_id" lay-verify="required" lay-reqtext="栏目分类必填项，岂能为空？">
                        <option value="">顶级分类</option>
						@foreach($categories as $item)
							<option value="{{ $item->column_mid }}" @if(isset($article->column_id)&&$article->column_id==$item->column_mid) selected @endif @if($item->ispart != 1)  @endif>{{ $item->name }}</option>
							@if(isset($item['children']))
								@foreach($item['children'] as $second)
									<option value="{{ $second->column_mid }}" {{ isset($article->column_id) && $article->column_id==$second->column_mid ? 'selected' : '' }} @if($second->ispart != 1) @endif>&nbsp;┗━━{{$second->name }}</option>
								@endforeach
							@endif
						@endforeach
        
                    </select>
                </div>
            </div>
        
            <div class="layui-form-item">
                <label class="layui-form-label layui-required">标题</label>
                <div class="layui-input-block">
                    <input type="text" name="title" value="{{ $article->title ?? old('title') }}" lay-verify="required" placeholder="请输入标题" class="layui-input" >
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-required">关键字</label>
                <div class="layui-input-block">
                    <input type="text" name="keywords" value="{{ $article->keywords ?? old('keywords') }}" placeholder="请输入关键字" class="layui-input" >
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label layui-required">seo标题</label>
                <div class="layui-input-block">
                    <input type="text" name="seo_title" value="{{ $article->seo_title ?? old('seo_title') }}" lay-verify="required" placeholder="请输入seo标题" class="layui-input" >
                </div>
            </div>
		
            <div class="layui-form-item">
                <label class="layui-form-label">描述</label>
                <div class="layui-input-block">
                    <input name="description" placeholder="请输入描述" value="{{$article->description??old('description')}}" class="layui-input" />
                </div>
            </div>
			  <div class="layui-form-item">
				<div class="layui-inline">
				  <label class="layui-form-label">网络图片</label>
				  <div class="layui-input-inline"  style="width:600px">
					<input type="url" name="downloadurl" id="downloadurl" autocomplete="off" class="layui-input">
				  </div>
				</div>
				<div class="layui-inline">
				  <button type="button" class="layui-btn downloadImage"><i class="layui-icon">&#xe67c;</i>网络上传</button>
				</div>
			  </div>

			  
            <div class="layui-form-item">
                <label class="layui-form-label layui-required">缩略图</label>
                <div class="layui-input-block">
                    <div class="layui-upload">
						<button type="button" class="layui-btn uploadPic"><i class="layui-icon">&#xe67c;</i>本地上传</button>
						<div class="layui-upload-list" >
							<ul id="layui-upload-box" class="layui-clear layui-upload-box">
								@if(isset($article->thumb))
									<li><img src="{{ $article->thumb }}" width="100"/><p></p></li>
								@endif
							</ul>
							<input type="hidden" name="thumb" id="thumb" class="layui-upload-input" value="{{ $article->thumb??'' }}"   lay-reqText="缩略图不能为空!">
						</div>
					</div>
                </div>
            </div>
        
            <div class="layui-form-item">
                    <label class="layui-form-label">推荐:</label>
                    <div class="layui-input-block">
                        <input type="radio" name="flag" value="1" title="推荐">
                        <input type="radio" name="flag" value="2" title="头条">
                        <input type="radio" name="flag" value="3" title="特荐">
						<input type="radio" name="flag" value="0" title="默认">
                    </div>
            </div>
        </div>
        <div class="layui-tab-item">
         <div class="layui-form-item layui-form-text">
                <main>
                	<div class="centered">
                		<div class="document-editor">
                			<div class="toolbar-container"></div>
                			<div class="content-container">
                				<div id="editor">
                					{!! $article->body??old('body') !!} 
                				</div>
                			</div>
                		</div>
                	</div>
                </main>
        </div>
      </div>
	  
    </div>
</div>
<div class="form-group-bottom text-center">
    <button class="layui-btn" lay-filter="SubmitData" lay-submit>&emsp;提交&emsp;</button>
	<button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
</div>

